/**
 * NewX3D
 * 
 * AUTHOR:	Ma Chao
 * EMAIL:	machaoii@263.net
 * MSN:	    machaoii@hotmail.com
 * QQ:	    68552233
 * _____________________________________________________________
 * http://newx3d.cn/blog   http://code.google.com/p/newx3d/
 * 
 * Copyright 2008 Ma Chao

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/


package kgame5.k3d.core.render.layerrender.impl.zbuffer {

/**
	 * 常量
	 */
	class ConstClass
	{
		public static const EPSILON_E3:Number=							Math.pow(10,-3); 
		public static const EPSILON_E4:Number=							Math.pow(10,-4); 
		public static const EPSILON_E5:Number=							Math.pow(10,-4); 
		public static const EPSILON_E6:Number=							Math.pow(10,-6);
		
		
		public static const POLY_STATE_ACTIVE:int=0x000001;
		public static const POLY_STATE_CLIPPED:int=0x000002;
		public static const POLY_STATE_BACKFACE:int=0x000004;
		
		
		public static const TRANSFORM_LOCAL_ONLY:int=0; 
		public static const TRANSFORM_TRANS_ONLY:int=1; 
		public static const TRANSFORM_LOCAL_TO_TRANS:int=2; 
		
		
		public static const CAM_ROT_SEQ_XYZ:int= 0;
		public static const CAM_ROT_SEQ_YXZ:int= 1;
		public static const CAM_ROT_SEQ_XZY:int= 2;
		public static const CAM_ROT_SEQ_YZX:int= 3;
		public static const CAM_ROT_SEQ_ZYX:int= 4;
		public static const CAM_ROT_SEQ_ZXY:int= 5;
		
		
		public static const CULL_OBJECT_X_PLANE:int= 0x000001; 
		public static const CULL_OBJECT_Y_PLANE:int= 0x000002; 
		public static const CULL_OBJECT_Z_PLANE:int= 0x000004; 
		public static const CULL_OBJECT_XYZ_PLANES:int=(CULL_OBJECT_X_PLANE | CULL_OBJECT_Y_PLANE | CULL_OBJECT_Z_PLANE);
	
		public static const OBJECT4DV2_STATE_NULL:int= 0x000000;
		public static const OBJECT_STATE_ACTIVE:int= 0x000001;
		public static const OBJECT_STATE_VISIBLE:int= 0x000002;
		public static const OBJECT_STATE_CULLED:int= 0x000004;
		
		
		
		public static const UVN_MODE_SPHERICAL:int=1;
		public static const UVN_MODE_SIMPLE:int=2;
		
		public static const CAM_MODEL_EULER:int=1;
		public static const CAM_MODEL_UVN:int=2;
		
		public static const SORT_POLYLIST_AVGZ:int= 0; 
		public static const SORT_POLYLIST_NEARZ:int= 1; 
		public static const SORT_POLYLIST_FARZ:int= 2; 
		
		public static const POINT_PLANE_INFRONT:int=1;
		public static const POINT_PLANE_BEHIND:int=2;
		public static const POINT_PLANE_COINCIDING:int=4;
		
		public static const POLY_PLANE_INFRONT:int=1;
		public static const POLY_PLANE_BEHIND:int=2;
		public static const POLY_PLANE_COINCIDING:int=4;
		public static const POLY_PLANE_SPANNING:int=8;
		
		public static const PARM_LINE_NO_INTERSECT:int=0;
		public static const PARM_LINE_INTERSECT_IN_SEGMENT:int=1;
		public static const PARM_LINE_INTERSECT_OUT_SEGMENT:int=2;
		public static const PARM_LINE_INTERSECT_EVERYWHERE:int=3;
		public static const PARM_LINE_INTERSECT_ON_END:int=4;
		
		
		//贴图映射的三角形分析所需常量
		public static const TRI_TYPE_NONE:int=            0;
		public static const TRI_TYPE_FLAT_TOP:int=        1 ;
		public static const TRI_TYPE_FLAT_BOTTOM:int= 	  2;
		public static const TRI_TYPE_FLAT_MASK:int=       3;
		public static const TRI_TYPE_GENERAL:int=         4;
		public static const INTERP_LHS:int=               0;
		public static const INTERP_RHS:int=               1;
		public static const FIXP16_SHIFT:int=16;
		public static const FIXP16_ROUND_UP:int= 0x008000;
		
		
		public static const MATERIAL_SOLID:int=1;
		public static const MATERIAL_BITMAP:int=2;
		
		//物空剪裁常量
		public static const CLIP_CODE_GZ:int=   0x0001;    
		public static const CLIP_CODE_LZ:int=   0x0002;   
		public static const CLIP_CODE_IZ:int=   0x0004;    
		
		public static const CLIP_CODE_GX:int=   0x0001;   
		public static const CLIP_CODE_LX:int=   0x0002;   
		public static const CLIP_CODE_IX:int=   0x0004;   
		
		public static const CLIP_CODE_GY:int=   0x0001;    
		public static const CLIP_CODE_LY:int=   0x0002;   
		public static const CLIP_CODE_IY:int=   0x0004;    
		
		public static const CLIP_CODE_NULL:int= 0x0000;
		
		public static const CLIP_POLY_X_PLANE:int=           0x0001;
		public static const CLIP_POLY_Y_PLANE:int=           0x0002;
		public static const CLIP_POLY_Z_PLANE:int=           0x0004;
		public static const CLIP_OBJECT_XYZ_PLANES:int=      (CULL_OBJECT_X_PLANE | CULL_OBJECT_Y_PLANE | CULL_OBJECT_Z_PLANE);
		public function ConstClass()
		{
		}
		

	}
}